package template_r

import (
	"frozen-go-mini/common/mycontext"
	"frozen-go-mini/resp"
	"github.com/gin-gonic/gin"
)

type Template struct {
	Id     uint64 `json:"id"` // id
	Image  string `json:"image"`
	Text   string `json:"text"`
	Price  string `json:"price"`
	URL    string `json:"url"`
	GifURL string `json:"gifUrl"`
}

// @Tags 活动模板
// @Summary 获取列表
// @Param Authorization header string true "token"
// @Success 200 {object} []Template
// @Router /v1.0/templates/list [get]
func TemplateList(c *gin.Context) (*mycontext.MyContext, error) {
	myCtx := mycontext.CreateMyContext(c.Keys)
	//model := domain.CreateModelContext(myCtx)
	//userId, err := req.GetUserId(c)
	//if err != nil {
	//	return myCtx, err
	//}
	activities := []Template{
		{
			Image:  "https://cdn.frozenhu.cn/uploads/file/nft/avatar/d8a105e8.webp",
			Text:   "活动一介绍",
			Price:  "88冰点",
			URL:    "https://cdn.frozenhu.cn/uploads/file/diy/activity/catch-game/index.html",
			GifURL: "https://cdn.frozenhu.cn/uploads/file/diy/activity/catch-game/catch-game_800k.gif",
		},
		{
			Image:  "https://cdn.frozenhu.cn/uploads/file/nft/avatar/a019d9c1.webp",
			Text:   "活动二介绍",
			Price:  "88冰点",
			URL:    "https://cdn.frozenhu.cn/uploads/file/diy/activity/qrcode-gen/qrious.html",
			GifURL: "https://cdn.frozenhu.cn/uploads/file/diy/activity/qrcode-gen/qrious.webp",
		},
		{
			Image:  "https://cdn.frozenhu.cn/uploads/file/nft/avatar/2fe7de40.webp",
			Text:   "活动三介绍",
			Price:  "88冰点",
			URL:    "https://cdn.frozenhu.cn/uploads/file/diy/activity/lucky-spin2/lucky-spin2.html",
			GifURL: "https://cdn.frozenhu.cn/uploads/file/diy/activity/lucky-spin2/lucky-spin2.gif",
		},
		{
			Image:  "https://cdn.frozenhu.cn/uploads/file/nft/avatar/65958d98.webp",
			Text:   "活动四介绍",
			Price:  "88冰点",
			URL:    "https://cdn.frozenhu.cn/uploads/file/diy/activity/lucky-spin1/lucky-spin1.html",
			GifURL: "https://cdn.frozenhu.cn/uploads/file/diy/activity/lucky-spin1/lucky-spin1.gif",
		},
		{
			Image:  "https://cdn.frozenhu.cn/uploads/file/nft/avatar/53175b6e.webp",
			Text:   "活动五介绍",
			Price:  "88冰点",
			URL:    "https://cdn.frozenhu.cn/uploads/file/diy/activity/slide/slide_slide.html",
			GifURL: "https://cdn.frozenhu.cn/uploads/file/diy/activity/slide/slide-slide.gif",
		},
		{
			Image:  "https://cdn.frozenhu.cn/uploads/file/nft/avatar/4e4f44e7.webp",
			Text:   "活动六介绍",
			Price:  "88冰点",
			URL:    "https://cdn.frozenhu.cn/uploads/file/diy/activity/shake/demo_import.html",
			GifURL: "https://cdn.frozenhu.cn/uploads/file/diy/activity/shake/shake-shake.gif",
		},
		{
			Image:  "https://cdn.frozenhu.cn/uploads/file/nft/avatar/635f22ce.webp",
			Text:   "活动七介绍",
			Price:  "88冰点",
			URL:    "https://cdn.frozenhu.cn/uploads/file/diy/test",
			GifURL: "https://cdn.frozenhu.cn/uploads/file/diy/activity/fruit/fruit.gif",
		},
		{
			Image:  "https://cdn.frozenhu.cn/uploads/file/nft/avatar/d9a18686.webp",
			Text:   "活动八介绍",
			Price:  "88冰点",
			URL:    "https://cdn.frozenhu.cn/uploads/file/diy/activity/mbti/index.html",
			GifURL: "https://cdn.frozenhu.cn/uploads/file/diy/activity/mbti/mbti.gif",
		},
		{
			Image:  "https://cdn.frozenhu.cn/uploads/file/nft/avatar/1613cd7e.webp",
			Text:   "活动九介绍",
			Price:  "88冰点",
			URL:    "https://cdn.frozenhu.cn/uploads/file/diy/activity/dig-gold/index.html",
			GifURL: "https://cdn.frozenhu.cn/uploads/file/diy/activity/dig-gold/dig-gold.gif",
		},
	}

	resp.ResponseOk(c, activities)
	return myCtx, nil
}
